import localKey from './localKey'


//  正式服部署
//http://pool.zbjlife.cn:6061 灵璧
//http://118.195.184.123:9091 亳州
const devApiUrl = 'http://127.0.0.1:9091/api';       //本地开发环境
//const devApiUrl = 'http://pool.zbjlife.cn:6061';        //本地开发环境
const buildDevApiUrl = 'http://www.zbjlife.cn/api';   //打包开发环境
const buildTestApiUrl ='http://www.zbjlife.cn/api';   //打包测试环境
const buildProApiUrl = 'http://www.zbjlife.cn/api';   //打包正式环境


let useApiUrl;

switch (process.env.NODE_ENV) {
    case 'development':
        useApiUrl = devApiUrl;
        break;
    case 'buildDev':
        useApiUrl = buildDevApiUrl;
        break;
    case 'buildTest':
        useApiUrl = buildTestApiUrl;
        break;
    case 'production':
        useApiUrl = buildProApiUrl;
        break;
}

export default {
    nodeDevEnv: process.env.NODE_ENV === 'development',
    apiUrl: useApiUrl,
    minSiteMame: 'EUI',
    apiPrefix: "",
    timeout: 5000,
    cookiesExpires: 7,
    requestRetry: 0,
    requestRetryDelay: 800,
    tokenKey: 'ACCESS_TOKEN',
    userInfoKey: 'USER_INFO',
    permissionsKey: 'PERMISSION_ARRAY',
    ...localKey
}
